package cn.itcast.controller;

import cn.itcast.service.HelloService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller //ioc容器中
@RequestMapping(value = "/hello")
public class HelloController {

    @Reference//import com.alibaba.dubbo.config.annotation.Reference; 问注册中心要
    private HelloService helloService;

    @ResponseBody
    @RequestMapping(value = "/findName")
    public String findName(){
        return helloService.findname();
    }
}
